import request from "@/utils/request";

// 查询加工方式列表
export function listMethod(query) {
  return request({
    url: "/md/method/list",
    method: "get",
    params: query,
  });
}

// 查询加工方式详细
export function getMethod(processingMethodId) {
  return request({
    url: "/md/method/" + processingMethodId,
    method: "get",
  });
}

// 新增加工方式
export function addMethod(data) {
  return request({
    url: "/md/method",
    method: "post",
    data: data,
  });
}

// 修改加工方式
export function updateMethod(data) {
  return request({
    url: "/md/method",
    method: "put",
    data: data,
  });
}

// 删除加工方式
export function delMethod(processingMethodId) {
  return request({
    url: "/md/method/" + processingMethodId,
    method: "delete",
  });
}
